package com.jy.borrowrecords.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jy.borrowrecords.mapper.BorrowrecordsMapper;
import com.jy.borrowrecords.domain.Borrowrecords;
import com.jy.borrowrecords.service.IBorrowrecordsService;

/**
 * 图书借阅记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-29
 */
@Service
public class BorrowrecordsServiceImpl implements IBorrowrecordsService 
{
    @Autowired
    private BorrowrecordsMapper borrowrecordsMapper;

    /**
     * 查询图书借阅记录
     * 
     * @param recordId 图书借阅记录主键
     * @return 图书借阅记录
     */
    @Override
    public Borrowrecords selectBorrowrecordsByRecordId(Long recordId)
    {
        return borrowrecordsMapper.selectBorrowrecordsByRecordId(recordId);
    }

    /**
     * 查询图书借阅记录列表
     * 
     * @param borrowrecords 图书借阅记录
     * @return 图书借阅记录
     */
    @Override
    public List<Borrowrecords> selectBorrowrecordsList(Borrowrecords borrowrecords)
    {
        return borrowrecordsMapper.selectBorrowrecordsList(borrowrecords);
    }

    /**
     * 新增图书借阅记录
     * 
     * @param borrowrecords 图书借阅记录
     * @return 结果
     */
    @Override
    public int insertBorrowrecords(Borrowrecords borrowrecords)
    {
        return borrowrecordsMapper.insertBorrowrecords(borrowrecords);
    }

    /**
     * 修改图书借阅记录
     * 
     * @param borrowrecords 图书借阅记录
     * @return 结果
     */
    @Override
    public int updateBorrowrecords(Borrowrecords borrowrecords)
    {
        return borrowrecordsMapper.updateBorrowrecords(borrowrecords);
    }

    /**
     * 批量删除图书借阅记录
     * 
     * @param recordIds 需要删除的图书借阅记录主键
     * @return 结果
     */
    @Override
    public int deleteBorrowrecordsByRecordIds(Long[] recordIds)
    {
        return borrowrecordsMapper.deleteBorrowrecordsByRecordIds(recordIds);
    }

    /**
     * 删除图书借阅记录信息
     * 
     * @param recordId 图书借阅记录主键
     * @return 结果
     */
    @Override
    public int deleteBorrowrecordsByRecordId(Long recordId)
    {
        return borrowrecordsMapper.deleteBorrowrecordsByRecordId(recordId);
    }
}
